package oop.java0328.work3;

public class Pet {
    private String name;
    private String breed;//品种
    private float weight;

    public Pet() {
    }

    public Pet(String name, String breed, float weight) {
        this.name = name;
        this.breed = breed;
        this.weight = weight;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getBreed() {
        return breed;
    }

    public void setBreed(String breed) {
        this.breed = breed;
    }

    public float getWeight() {
        return weight;
    }

    public void setWeight(float weight) {
        this.weight = weight;
    }

    public void eat() {
        System.out.println("吃东西");
    }

    public void sleep() {
        System.out.println("睡觉");
    }

    public void introduce() {
        System.out.println("自我介绍：\n我的名字是" + name + "是一个" + breed + ",体重" + weight + "千克");
    }

}
